#!/usr/bin/env node

const fs = require('fs'),
      dir = process.argv[2];
try{
  if(fs.statSync(dir).isFile()){
    console.log(`${dir} is file`);
  }
  fs.rmdirSync(dir);
}catch(e){
  console.error(e.message);
  process.exit(1);
}
